<?php

namespace app\api\validate;

use think\Validate;

class GroupUserValidate extends Validate
{
    //定义验证规则
    protected $rule = [
        'uid|用户id' => 'require',
        'url|群头像' => 'require',
        'members|初始群成员' => 'require',
        'group_id|群id group_id' => 'require',
        'page|页码' => 'require',
        'limit|每页多少条' => 'require',
    ];

    //定义验证提示
    protected $message = [
        'uid.require' => '缺少参数uid',
        'members.require' => '缺少参数 初始群成员',
        'group_id.require' => '缺少参数 群id group_id',
        'limit.require' => '缺少参数 条数 limit',
        'page.require' => '缺少参数 条数 page',
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'addGroupUser' => ['group_id','members'],
        'exitGroup'     => ['members','group_id'],
        'list' => ['uid','page','limit'],
        'addzhiboqunGroupUser' => [ 'group_id','uid'],
    ];


}
